#pragma once

#include <QLabel>
#include <QMainWindow>
#include "Game.h"
#include "GameBoard.h"

namespace Ui {
    class MainWindow;
}

// 主窗口
class MainWindow: public QMainWindow {
    Q_OBJECT

    private: Ui::MainWindow* ui;        // 界面
    private: GameBoard mGameBoard;      // 游戏区域
    private: Game *mGame;               // 游戏
    private: QLabel mLabelLevel;        // "关卡数"标签
    private: QLabel mLabelMoveCount;    // "移动次数"标签

    public: explicit MainWindow(QWidget* parent = nullptr);
    public: ~MainWindow();
    private: void keyPressEvent(QKeyEvent*);
    private slots: void on_actionRestart_triggered();
    private slots: void on_actionSelectLevel_triggered();
    private slots: void on_actionUndo_triggered();
    private slots: void onGameOver(bool);
    private slots: void onGotoLevel(int);
    private slots: void onManMoved(int);
};
